package com.servlet.service.impl;

import com.servlet.bean.Student;
import com.servlet.dao.StudentDao;
import com.servlet.service.StudentService;

import java.sql.SQLException;
import java.util.List;

/**
 * @Title: StudentServiceImpl
 * @Description:
 * @Auther: py
 * @Version: 1.0
 * @create 2023/12/26 14:28
 */
public class StudentServiceImpl implements StudentService {

    private StudentDao studentDao = new StudentDao();
    @Override
    public List<Student> queryStus() throws SQLException {
        return studentDao.queryStus();
    }

    @Override
    public Student queryStuById(String id) throws SQLException {
        return studentDao.queryStuById(id);
    }

    @Override
    public void addStu(Student student) throws SQLException {
        studentDao.addStu(student);
    }

    @Override
    public void editStu(Student student) throws SQLException {
        studentDao.editStu(student);
    }

    @Override
    public void deleteStuById(String id) throws SQLException {
        studentDao.deleteStuById(id);
    }
}
